<template>
  <div class="app-container">
    <el-button type="warning" @click="back" size="mini" style="float:right;">返回</el-button>
    <div v-html="html"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      html: "",
      time: new Date().getTime(),
    };
  },
  mounted() {
    this.getNewsDetail();
  },
  methods: {
    getNewsDetail() {
      let params = {
        time: this.time,
        id:this.$route.query.id
      };
      let result = this.$md5.transferValue(params);
      this.axios
        .post(this.stateUrl.dataModel.newsDetail, {
          time: this.time,
          id:this.$route.query.id,
          sign: this.$md5.val(result),
        })
        .then((res) => {
          this.html = res.data.data.newsContent;
        })
        .catch(() => {});
    },
    back() {
      this.$router.back();
    },
  },
};
</script>
<style lang="less" scoped>
</style>